﻿using System.Linq;
using System.Web.Mvc;
using TestApplication.Domain.Models;

namespace TestApplication.WebUI.Controllers
{
    public class StoresController : Controller
    {
        private readonly UnitOfWork _unitOfWork;

        public StoresController(UnitOfWork unitOfWork)
        {
            _unitOfWork = unitOfWork;
        }

        public ActionResult Index()
        {
            var storeList = _unitOfWork.StoreRepository.AsQueryable.ToList();
            return View(storeList);
        }
    }
}